package com.studyroom.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import lombok.Data;

import java.time.LocalDateTime;

@Data
public class Question {
    @TableId(type= IdType.AUTO)
    private Long id;
    private Long userId;
    @TableField(exist = false)
    private String username;
    @TableField(exist = false)
    private String icon;
    private String title;
    private String content;
    private String type;
    /*
    * 如果该问题已被解决，设置 answer表id
    * */
    private Long solveId;
    private Long liked;
    @TableField(exist = false)
    private Boolean isLike;
    @TableField(exist = false)
    private Long answerCount;
    private LocalDateTime created;
    @TableField(exist = false)
    private Long pageview;

}
